//tbTask.entity.ts


import { Entity, Column, PrimaryGeneratedColumn } from "typeorm";


@Entity("tb_task")
export class tbTaskEntity {


  @PrimaryGeneratedColumn({ name: "id" })


  id: number;


  @Column({ name: "name" })


  name: string;


  @Column({ name: "content" })


  content: string;


  @Column({ name: "parent_id" })


  parentId: number;


  @Column({name:'planstarttime'})
  planstarttime:Date;

  @Column({name:'planendtime'})
  planendtime:Date;

  @Column({name:'realstarttime'})
  realstarttime:Date;

  @Column({name:'realendtime'})
  realendtime:Date;

  @Column({name:'state'})
  state:number;

  constructor(_data: any) {

    this.id = _data?.id;

    this.name = _data?.name;

    this.content = _data?.content;

    this.parentId = _data?.parentId;


    this.planstarttime = _data?.planstarttime;

    this.planendtime = _data?.planendtime;

    this.realstarttime = _data?.realstarttime;

    this.realendtime = _data?.realendtime;

    this.state = _data?.state;


  }

}

